﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace UI.Desktop
{
    public partial class frmGestionTurnos : Form
    {
        public frmGestionTurnos()
        {
            InitializeComponent();
        }

        private void cbPaciente_Click(object sender, EventArgs e)
        {
           
        
            Business.Entities.Paciente pac = new Business.Entities.Paciente();
            DataSet dsPac = new DataSet();
            dsPac = pac.ObtenerListaPacientes();
            ObtenerPacientes(dsPac);
        }

        

        private void ObtenerPacientes(DataSet dsPac)
        {
            cbPaciente.Text = "Seleccione el paciente";
            cbPaciente.DataSource = dsPac.Tables["Paciente"];
            cbPaciente.DisplayMember = dsPac.Tables["Paciente"].Columns[1].Caption.ToString();
        }

        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Business.Entities.Paciente Pac = new Business.Entities.Paciente();
            DataSet dspac = new DataSet();
            string Concatenado = cbPaciente.Text.ToString();
            dspac = Pac.ObtenerListaPacientesConNombreApellido(Concatenado);
          
            
            

        }
        }
    }

